<%@ page import="com.ant.myagile.backlog.Issue" %>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<meta name="layout" content="main"/>
		<title>Create a new issue</title>
	</head>
	<body>

	<h1>EDIT ISSUE ${iss.id}</h1>

	<div style="margin:auto; width:90%; text-align: left">
			<span><a href="${createLink(controller:'Issue',action:'listIssue')}" ><img alt="setting" src="../images/skin/list-view.png"> List Story </a></span>			
			<span style="margin-left:20px"><a href="${createLink(controller:'Issue',action:'newIssue')}" ><img alt="setting" src="../images/skin/add-icon.png"> New Story </a></span>
	</div>
	<div style="clear:both"></div>

	<g:form action="updateIssue" controller="issue">
	<table cellspacing="0">
    <tr>
		<td>ID</td>
		<td> 
			<input type="text" name="id1" value="${iss.id}" disabled="disabled">
			<input type="hidden" name="id" value="${iss.id}">
		</td>
	</tr>
	<tr>
		<td>User Story:</td>
		<td> <g:select name="userStory" from="${userStoryList}" optionKey="id" noSelection="${['null':' - ']}" value="${iss?.userStory?.id}" /></td>
	</tr>
	<tr>
		<td>Sprint:</td>
		<td><g:select name="sprint" from="${sprintList}" optionKey="id" noSelection="${['null':' - ']}" value="${iss?.sprint?.id}"/></td>
	</tr>
	<tr>
		<td>Type:</td>
		<td> <g:select name="type" from="${["User Story","Task","Bug"]}" value="${iss?.type}"/></td>
	</tr>
	<tr>

	<td>Subject:</td>
	<td><input type="text" name="subject" value="${iss.subject}" required="required"></td>

	</tr>
	<tr>
	<td>Description:</td>
	<td> <g:textArea name="description" rows="8" cols="60" value="${iss.description}" required="required" />
	</td>

	</tr>
	<tr>
		<td>Status:</td>
		<td> <g:select name="status" from="${['Not started','Progress','Blocked','Verify','Done','Void']}" value="${iss.status}"/></td>
	</tr>
	<tr>
		<td>Priority:</td>
		<td><g:select name="priority" from="${['Must','Should','Could','Wont']}" noSelection="${['null':' - ']}" value="${iss.priority}"/></td>
	</tr>
	<tr>
		<td>Asigned to:</td>
		<td><g:select name="assigned" from="${memberList}"  optionKey="id" noSelection="${['null':' - ']}" value="${iss?.assigned?.id}"/></td>
	</tr>
	<tr>
		<td>Remain:</td>
		<td><input type="text" name="remain" value="${iss.remain}"></td>
	</tr>
	<tr>
		<td>Estimate:</td>
		<td><input type="text" name="estimate" value="${iss.estimate}"></td>
	</tr>
    <tr>
    	<td colspan="2" align="center"><g:submitButton name="submit" value="Update"/></td>
    </tr>
	
	</table>
	</g:form>		
	</body>
</html>
